package iedcyt.acute.controller.listeners.author;

import iedcyt.acute.model.AuthorModel;

import iedcyt.acute.view.AuthorView;


import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

/**
 * Controlador para la seleccion de firma
 * @author 53385255R
 *
 */
public class SignsSelectionListener implements Listener {

	private AuthorModel _model;
	private AuthorView _view;
	
	/**
	 * Se inicializa el controlador registrando la vista y el modelo
	 * @param view
	 * @param model
	 */
	public SignsSelectionListener(AuthorView view, AuthorModel model) {
		this._model = model;
		this._view = view;
	}
	
	/**
	 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
	 */
	public void handleEvent(Event event) {
		Integer idSg = _view.getSelectedSignID();
		_model.setSelected_IdSign(idSg);
	}
}
